
Retrieve the XQuery library module or server-side JavaScript module implementing the named resource service extension.
| Request Headers | |
|---|---|
| Accept? |
The expected MIME type of the response. Only
application/xquery and
application/vnd.marklogic-javascript are accepted.
|
| Response Headers | |
|---|---|
| Content-type |
The MIME type of the content in the response. The content type
is always either application/xquery, or
application/vnd.marklogic-javascript.
|
Upon success, MarkLogic server returns status 200 (OK) and returns the XQuery library module implementing the extension in the response body.
rest-admin role, or the
following privileges:
http://marklogic.com/xdmp/privileges/rest-admin
http://marklogic.com/xdmp/privileges/rest-writer
http://marklogic.com/xdmp/privileges/rest-reader
$ curl --anyauth --user user:password -H "Accept: application/xquery" -i \
-X GET http://localhost:8004/v1/config/resources/example
==> The contents of the XQuery library module that implements the
"example" resource services. MarkLogic Server returns:
Server: MarkLogic
Content-Type: text/xml; charset=UTF-8
Content-Length: 211
Connection: close
HTTP/1.1 200 OK
Content-type: application/xquery
Server: MarkLogic
Content-Length: 650
Connection: close
xquery version "1.0-ml";
module namespace example="http://marklogic.com/rest-api/resource/example";
declare function example:get(
...